# -*- coding:utf-8 -*-
from rest_framework import serializers

from Apps.DataGeneration.models import DataGeneration, DataGenerationCat


class DataGenerationCatSer(serializers.ModelSerializer):
    class Meta:
        model = DataGenerationCat
        fields = '__all__'


class DataGenerationSer(serializers.ModelSerializer):
    category = DataGenerationCatSer(many=True)

    class Meta:
        model = DataGeneration
        fields = '__all__'
